package com.fau.om.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;
import org.json.simple.JSONAware;
import org.json.simple.JSONObject;

/**
 * @desc 核单员订单统计
 * @author kangyj
 * @datetime 2014年12月11日,上午11:57:46
 */
@Entity
@Table(name = "medical_orders_check_sta")
public class MedicalOrdersCheckSta implements Serializable, JSONAware {

	private static final long serialVersionUID = -8517901387470647213L;

	private String id;
	private String checkUserId;		// 审核人id
	private String checkUserName;	// 审核人姓名
	private String checkType;		// 审核类型（取消单、核过单）
	private Date checkTime;			// 审核时间
	private String hospitalId;		// 医院id
	
	private String startTime;		// 审核开始时间
	private String endTime;			// 审核结束时间
	private Integer totalCheckCount;	// 核单总数
	private Integer checkPass;			// 核过单数
	private Integer checkNoPass;		// 未核过单数
	private Integer checkCancel;		// 取消单数
	private Integer checkInvalid;		// 无效单数
	private BigDecimal NoPassProportion;// 未核过比例

	@Id
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@GeneratedValue(generator = "generator")
	@Column(name = "id", length = 32)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "check_user_id", length = 32)
	public String getCheckUserId() {
		return checkUserId;
	}

	public void setCheckUserId(String checkUserId) {
		this.checkUserId = checkUserId;
	}
	
	@Column(name = "check_user_name", length = 50)
	public String getCheckUserName() {
		return checkUserName;
	}

	public void setCheckUserName(String checkUserName) {
		this.checkUserName = checkUserName;
	}

	@Column(name = "check_type", length = 20)
	public String getCheckType() {
		return checkType;
	}

	public void setCheckType(String checkType) {
		this.checkType = checkType;
	}

	@Column(name = "check_time")
	public Date getCheckTime() {
		return checkTime;
	}

	public void setCheckTime(Date checkTime) {
		this.checkTime = checkTime;
	}
	
	@Transient
	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	@Transient
	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	@Transient
	public Integer getTotalCheckCount() {
		return totalCheckCount;
	}

	public void setTotalCheckCount(Integer totalCheckCount) {
		this.totalCheckCount = totalCheckCount;
	}

	@Transient
	public Integer getCheckPass() {
		return checkPass;
	}

	public void setCheckPass(Integer checkPass) {
		this.checkPass = checkPass;
	}

	@Transient
	public Integer getCheckNoPass() {
		return checkNoPass;
	}

	public void setCheckNoPass(Integer checkNoPass) {
		this.checkNoPass = checkNoPass;
	}

	@Transient
	public Integer getCheckCancel() {
		return checkCancel;
	}

	public void setCheckCancel(Integer checkCancel) {
		this.checkCancel = checkCancel;
	}
	
	@Transient
	public Integer getCheckInvalid() {
		return checkInvalid;
	}

	public void setCheckInvalid(Integer checkInvalid) {
		this.checkInvalid = checkInvalid;
	}

	@Transient
	public BigDecimal getNoPassProportion() {
		return NoPassProportion;
	}

	public void setNoPassProportion(BigDecimal noPassProportion) {
		NoPassProportion = noPassProportion;
	}
	
	@Column(name = "hospital_id", length = 32)
	public String getHospitalId() {
		return hospitalId;
	}

	public void setHospitalId(String hospitalId) {
		this.hospitalId = hospitalId;
	}

	@SuppressWarnings("unchecked")
	@Override
	public String toJSONString() {
		JSONObject obj = new JSONObject();
		obj.put("checkUserName", checkUserName);
		obj.put("totalCheckCount", totalCheckCount);
		obj.put("checkPass", checkPass);
		obj.put("checkNoPass", checkNoPass);
		obj.put("checkCancel", checkCancel);
		obj.put("NoPassProportion", NoPassProportion);
		obj.put("checkInvalid", checkInvalid);
		return obj.toString();
	}

}
